var mongoose = require('mongoose');

mongoose.connect('mongodb://localhost/test');

var schema = mongoose.Schema;

var imageInfoSchema = new schema({
    id:{
        type:Number,
        required:true
    },
    src1:{
        type:String,
        required:true
    },
    src2:{
        type:String,
        required:true
    },
    src3:{
        type:String,
        required:true
    },
    src4:{
        type:String,
        required:true
    },
    src5:{
        type:String,
        required:true
    }
});
var imageinfo = mongoose.model('imageinfo',imageInfoSchema);
/*var admin = new imageinfo({
    id:1,
    src1:'http://img4.imgtn.bdimg.com/it/u=334203034,4279295770&fm=15&gp=0.jpg',
    src2:'http://pic1.win4000.com/wallpaper/b/582d6ea9a59b6.jpg?down',
    src3:'http://img4.imgtn.bdimg.com/it/u=4288117439,1382212570&fm=214&gp=0.jpg',
    src4:'http://img5.imgtn.bdimg.com/it/u=1981206907,3660125216&fm=15&gp=0.jpg',
    src5:'http://img1.xiazaizhijia.com/walls/20160418/1440x900_8ad4e182d9f12d0.jpg',
 });


admin.save(function (err, ret) {
  if (err) {
    console.log('保存失败')
  } else {
    console.log('保存成功')
    console.log(ret)
  }
});*/


module.exports = imageinfo;

